/**
 * 
 */
package soa.security.dao;

import java.util.List;
import java.util.Map;

import org.springframework.ldap.query.SearchScope;

import soa.security.domain.Department;
import soa.security.domain.Group;
import soa.security.domain.Person;
import soa.security.domain.Position;
import soa.security.domain.Role;

/**
 * @author Cre.Gu
 *
 */
public interface DepartmentDao extends SpringLdapDao<Department> {

	List<Department> allDepartments(String baseDn, SearchScope searchScope, Map<String, Object> parameters);

	public List<Department> allSubDepartments(String baseDn, String parentBid, SearchScope searchScope,
			Map<String, Object> parameters);

	void addPersons(Department department, Person pe);

	public void addPositions(Department department, Position position);

	void addGroups(Department department, Group g);

	void addRoles(Department department, Role r);

	void removePersons(Department department, Person findByPrimaryKey);

	void removePositions(Department department, Position position);

	void removeGroups(Department department, Group g);

	void removeRoles(Department department, Role r);

	List<String> allPersons(Department department);

	List<String> allPositions(Department department);

	List<String> allGroups(Department department);

	List<String> allRoles(Department department);

	List<String> allApplsystem(Department department);
	
	public List<Department> existName(String name);
	
	public List<Department> existGradeCode(String gradeCode);

}
